<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <title>无限极创新资讯分享后台</title>
    <link href="images/style.css" rel="stylesheet" type="text/css" />
    <script src="http://cdn.bootcss.com/jquery/2.1.3/jquery.min.js"></script>

</head>
    
<body>     
    <div id="addtag-wrap">

     <div class="rsspart">
         <span>所属职级:</span>
         <div class="show">
           请选择
         </div>
         <select class="selectbox">
           <option selected value="">请选择</option>
           <option value="1">1</option>
           <option value="2">2</option>
           <option value="3">3</option>
           <option value="4">4</option>
         </select>
     </div>
     <div class="rsspart">
         <span style="margin-left:7%"><img src="images/mustbe.png" alt="">标签名:</span>
         <input class="tagN" type="text" value="创想平台">
         <img class="truepng" src="images/true.png" alt="">
     </div>
     <div class="rsspart">
         <span style="margin-left:9%;">同义词:</span>
         <input type="text" placeholder="你可以添加同义词，以逗号隔开">
     </div>
     <div class="rsspart">
         <span style="margin-left:4%;"><img src="images/mustbe.png" alt="">关联标签:</span>
         <div class="content">
         	<span>美文鉴赏</span>
         	<span>无限极</span>
         	<span>思利及人</span>
         	<span>美文鉴赏</span>
         	<span>无限极</span>
         	<span>思利及人</span>
         	<span>美文鉴赏</span>
         	<span>无限极</span>
         	<span>思利及人</span>
         	<span>美文鉴赏</span>
         	<span>无限极</span>
         	<span>思利及人</span>
         </div>
     </div>
     <div class="rsspart">
         <span style="margin-left:13%;">简介:</span>
         <textarea></textarea>
         <!-- <div class="slide">
         	<img src="images/slidetop.png" alt="">
         	<img src="images/slidebottom.png" alt="">
         </div> -->
     </div>

     <div class="sure">确认</div>

    </div>
</body>

<script>
	$(function(){

		//标签名
		$(".tagN").on("input",function(){
			if(this.value!=''){
				$(".rsspart .truepng").css({display:"block"});
			}
			else $(".rsspart .truepng").css({display:"none"});
		});

		//关联标签
		$(".content span").on("click",function(e){

			  var nowcolor= $(this).css("background-color");   
		      if (nowcolor=="rgb(225, 225, 225)"){
		        //蓝色底
		        $(this).css({background:"rgb(145,227,215)"});
		        $(this).addClass("ischose");
		      }   
		      else{
		        //灰色底
		        $(this).css({background:"rgb(225,225,225)"});
		        $(this).removeClass("ischose");
		      }

		})

     
    })
</script>

</html>


